
ssc install fmlogit

import delimited "/Users/brianhamel/Dropbox/switchers/Matching/data/contribDB.csv"


## Geog

fmlogit post_in_district post_out_district post_unknown, ///
eta(switcher i.switcher_code dem dwnom1 seniority dpres les votepct pre_in_district pre_out_district general_length)

margins, dydx(*) pr(out(post_in_district))
margins, dydx(*) pr(out(post_out_district))
margins, dydx(*) pr(out(post_unknown))


 
 ## Sources
 
 fmlogit post_party post_business post_individual post_labor post_ideological post_other, ///
eta(switcher i.switcher_code dem dwnom1 seniority dpres les votepct pre_party pre_business pre_individual pre_labor pre_ideological general_length)

margins, dydx(*) pr(out(post_party))
margins, dydx(*) pr(out(post_business))
margins, dydx(*) pr(out(post_individual))
margins, dydx(*) pr(out(post_labor))
margins, dydx(*) pr(out(post_ideological))
margins, dydx(*) pr(out(post_other))



## OLS replication for Table A14

reg post_out_district switcher i.switcher_code dem dwnom1 seniority dpres les votepct pre_in_district pre_out_district general_length

reg post_party switcher i.switcher_code dem dwnom1 seniority dpres les votepct pre_party pre_business pre_individual pre_labor pre_ideological general_length
